import axios from "axios";
import {useUserStore} from "@/stores/user.ts";

axios.interceptors.request.use((config) => {
    const store = useUserStore();
    if (store.token) {
        config.headers.Authorization = `Bearer ${store.token}`;
    }
    return config;
});